<html>
<head>
	<meta charset="UTF-8">
	<title>axios-axios.race</title>
	<script type="text/javascript" src="./axios.js"></script>
</head>
<body>

<script type="text/javascript">

function test01() {
    return axios.get('/user/queryUserList.do');
}
function test02() {
    return axios.get('/good/queryGoodList.do?goodId=&goodName=&goodPrice=');
}
function test03() {
    return axios.get('/order/queryOrderList.do');
}
//同时发起,只要有一个结果返回,就触发回调,然后就不会有第2次回调了
Promise.race([test01(), test02(), test03()]).then((result) => {
    console.log(result);
});

</script>
</body>
</html>